package cn.iocoder.yudao.module.voice.cc.tcp.handler.base;

import cn.iocoder.yudao.module.core.po.AgentInfo;
import cn.iocoder.yudao.module.voice.cc.config.Handler;
import cn.iocoder.yudao.module.voice.cc.tcp.event.base.SubBaseEvent;
import cn.iocoder.yudao.module.voice.cc.websocket.WebFsSocketHandler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * Create by caoliang on 2020/10/30
 */
public abstract class SubBaseHandler<T extends SubBaseEvent> implements Handler<T> {
    protected Logger logger = LoggerFactory.getLogger(getClass());

    @Autowired
    protected WebFsSocketHandler webFsSocketHandler;

    protected void sendAgentMessage(AgentInfo agentInfo, String payload) {
        webFsSocketHandler.sendMessgae(agentInfo,payload);
    }
}
